Package slides.move

Source Code of slides.move.ApacheMoveSlides

package slides.move;

import java.io.FileInputStream;
import java.io.FileOutputStream;

import org.apache.poi.xslf.usermodel.XMLSlideShow;
import org.apache.poi.xslf.usermodel.XSLFSlide;

public class ApacheMoveSlides
{
  public static void main(String[] args) throws Exception
  {
    XMLSlideShow ppt = new XMLSlideShow(new FileInputStream("data/presentation.pptx"));

    //add slides
      ppt.createSlide();
      ppt.createSlide();
      ppt.createSlide();

      XSLFSlide[] slides = ppt.getSlides();
      ppt.setSlideOrder(slides[0], 4);
     
      //save changes in a file
      FileOutputStream out = new FileOutputStream("data/Apache_ReOrdered_Slides.pptx");
      ppt.write(out);
      out.close();
     
    System.out.println("Slides ReOrdered Successfuly.");
  }
}
TOP

Related Classes of slides.move.ApacheMoveSlides

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.